package com.tiany.java_study_exercise;

public class Overload {
    public void mOL(int a) {
        System.out.println(a * a);
    }

    public void mOL(int a, int b) {
        System.out.println(a * b);
    }

    public void mOL(String a) {
        System.out.println(a);
    }

    /* ******************************* */
    public void max(int a, int b) {
        System.out.println((a > b) ? a : b);
    }

    public void max(double a, double b) {
        System.out.println((a > b) ? a : b);
    }

    public void max(double a, double b, double c) {
        double max = a;
        if (max < b) {
            max = b;
            if (max < c) {
                max = c;
            }
        }
        System.out.println(max);
    }

}
